package com.siwei.mes.entity.system;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;
import java.util.Set;


/**
 * 试验项目配置(TestProjectInfo)实体类
 *
 * @author linzi
 * @since 2023-12-21 21:01:52
 */
@Data
@Accessors(chain = true)
@Table(name = "pk_test_project_info")
@ApiModel(value = "TestProjectInfo", description = "试验项目配置")
public class TestProjectInfo implements Serializable {
    private static final long serialVersionUID = -33988692629833898L;
    /**
     * 主键id
     */
    @Id
    @ApiModelProperty(value = "试验项目配置主键ID", name = "id")
    private Long id;
    /**
     * 试验类型
     */
    @Column(name = "test_type")
    @ApiModelProperty(value = "试验类型", name = "testType")
    private String testType;
    /**
     * 试验项目code
     */
    @Column(name = "test_code")
    @ApiModelProperty(value = "试验项目code", name = "testCode")
    private String testCode;
    /**
     * 试验项目名称
     */
    @Column(name = "test_name")
    @ApiModelProperty(value = "试验项目名称", name = "testName")
    private String testName;
    /**
     * 是否是快检 1-是 0-不是
     */
    @Column(name = "is_quick")
    @ApiModelProperty(value = "是否是快检 1-是 0-不是", name = "isQuick")
    private Long isQuick;
    /**
     * 是否是批检  1-是  0-不是
     */
    @Column(name = "is_batch")
    @ApiModelProperty(value = "是否是批检  1-是  0-不是", name = "isBatch")
    private Long isBatch;

    // 这个暂时没有用了
    @Column(name = "obj_json")
    @ApiModelProperty(value = "对应试验json")
    private JSONObject objJson;

    /**
     * 取样数量默认值 默认为1 -1为不配置
     */
    @Column(name = "sample_quantity")
    @ApiModelProperty(value = "取样数量默认值 默认为1 -1为不配置", name = "sampleQuantity")
    private Double sampleQuantity;

    @Transient
    @ApiModelProperty(value = "多个类型")
    private List<String> testTypeList;

    @Transient
    @ApiModelProperty(value = "类型名称")
    private String testTypeName;

    @Transient
    @ApiModelProperty(value = "多个试验项目code")
    private Set<String> testCodeList;


    @Column(name = "parameter_name")
    @ApiModelProperty(value = "对应上海协会试验名称", name = "parameterName")
    private String parameterName;

    @Column(name = "sort_no")
    @ApiModelProperty(value = "排序")
    private Integer sortNo;
}
